
var HomePageView = Backbone.View.extend({
    el:$('#homePage'),
    template: _.template(templateLoader['homePage']),
    initialize:function(){
        this.listenTo(this.model,'change',this.render);
    },
    render:function(model){
        this.$el.html(this.template(model.toJSON()));
        var sch = $(window).height();
        var bdh = $('#homePage').height();
        var foh = bdh >= sch ? 0 : sch-bdh;
        $('#homePageFooter').css('top',foh+'px');
        $('.flexslider').flexslider({
            animation: "slide",
            slideshowSpeed:"3000",
            start: function(slider){
                
            }
        });

    }
});
var homePageView = new HomePageView({model:homePageModel});